from flask import Flask, session
from app.controller.usr import usr_module
from app.controller.fund import fund_module
from app.controller.advisor import advisor_module

app = Flask(__name__)
app.secret_key = '1666611158'
#


app.register_blueprint(usr_module)
app.register_blueprint(fund_module)
app.register_blueprint(advisor_module)


@app.route('/')
def index():
    user_id = session.get('user_id')
    if user_id is not None:
        return 'hello'
    else:
        return 'please login'


if __name__ == '__main__':
    # 测试用户登录
    app.run(port=5000, debug=True)
